<%--
  Created by IntelliJ IDEA.
  User: landeqing
  Date: 2018/1/29
  Time: 15:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="/jquery/jquery-3.2.1.min.js"></script>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript">
        function toSaveAddress() {
            window.location.href="/order/toSaveAddress";
        }
    </script>
</head>
<body>
<form action="/order/submitOrder" method="post">
    <div style="background-color: antiquewhite" >
    <table>
        <tr>
           <td> 收货人信息</td>
            <td><input type="button" value="新增收货人" onclick="toSaveAddress()"></td>
        </tr>
        <c:forEach items="${addressList}" var="obj">
            <tr>
                <td> <input type="radio" value="${obj.id}" name="addressId" onclick="toChecked()" id="checkedId"/> </td>
                <td>${obj.receiver}${obj.phone}${obj.address}</td>
            </tr>
        </c:forEach>
    </table>
    </div>
    <input type="hidden" name="id">
    <input type="hidden" name="uid" value="${sessionScope.user.id}">
    <div style="background-color: aliceblue">
        <table>
            <tr>

                <td> 支付方式:<input type="radio" name="payType" value="1">货到付款</td>
                <td><input type="radio" name="payType" value="2">在线支付</td>
                <td><input type="radio" name="payType" value="3">公司付款</td>
            </tr>
        </table>
    </div>
    <div style="background-color: white">
        <table>
            <tr>送货清单</tr>
        </table>

    </div>
    <div style="background-color: ivory">
        <table>
            <tr>
                <td>商品名字</td>
                <td>商品价格</td>
                <td>商品数量</td>
            </tr>
            <c:forEach var="obj" items="${voList}">
                <input type="hidden" value="${obj.cartId}" name="cartId">
                <input type="hidden" name="proId" value="${obj.id}">
                <tr>
                    <td><input style="border: 0px; background-color:ivory; " name="proName" value="${obj.product_name}" readonly="readonly"></td>
                    <td><input style="border: 0px;background-color:ivory;" name="proPrice" value="${obj.price}" readonly="readonly"></td>
                    <td><input style="border: 0px;background-color:ivory;" name="proCount" value="${obj.count}" readonly="readonly"></td>
                </tr>
            </c:forEach>
        </table>
    </div>
    <div style="background-color: yellowgreen">
        <table>
            <tr>
                <td>应付总额<input style="border:0px;background-color: yellowgreen" value="${totalPrice}" name="totalPrice" readonly="readonly"></td><br>

            </tr>
            <tr>
                <td><input type="submit" value="提交订单"></td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>
